package com.enqualcomm.kids.mvp.seetheworld;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Sunzhigang on 2016/3/10.
 */
public class MyFragmentPageAdapter extends FragmentPagerAdapter{
    List<Fragment> fragments;
    public MyFragmentPageAdapter(FragmentManager fm,List<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }
    @Override
    public Fragment getItem(int position) {
       return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
